package com.qxzn.app.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

public class LeaveVoiceMsgBean implements Parcelable {
    public static final Creator<LeaveVoiceMsgBean> CREATOR = new Creator<LeaveVoiceMsgBean>() {
        @Override
        public LeaveVoiceMsgBean createFromParcel(Parcel source) {
            return new LeaveVoiceMsgBean(source);
        }

        @Override
        public LeaveVoiceMsgBean[] newArray(int size) {
            return new LeaveVoiceMsgBean[size];
        }
    };
    /**
     * result : [{"id":"10c683c0f56811e9bc8361b90f4d456415134552845","username":"15134552845","usernickname":"Jesse1","message":"img/leavingmessage/9ac019acab486ad7db721f2b6f1b94a8/2019102315381015134552845.amr","recipient":"hsq3","recipientnickname":"庄勇斌2","createtime":1571816291836,"timelength":2,"state":0,"device_id":"9ac019acab486ad7db721f2b6f1b94a8"},{"id":"00cefd80f56811e9bc8361b90f4d456415134552845","username":"15134552845","usernickname":"Jesse1","message":"img/leavingmessage/9ac019acab486ad7db721f2b6f1b94a8/2019102315374215134552845.amr","recipient":"hsq1","recipientnickname":"庄勇斌","createtime":1571816265047,"timelength":3,"state":0,"device_id":"9ac019acab486ad7db721f2b6f1b94a8"},{"id":"e77630b0f56711e9bf019f8fc7ccebdc15134552845","username":"15134552845","usernickname":"Jesse1","message":"img/leavingmessage/9ac019acab486ad7db721f2b6f1b94a8/2019102315365815134552845.amr","recipient":"hsq1","recipientnickname":"庄勇斌","createtime":1571816222523,"timelength":4,"state":0,"device_id":"9ac019acab486ad7db721f2b6f1b94a8"},{"id":"bc774340f56711e9bf019f8fc7ccebdc15134552845","username":"15134552845","usernickname":"Jesse1","message":"img/leavingmessage/9ac019acab486ad7db721f2b6f1b94a8/2019102315354715134552845.amr","recipient":"hsq1","recipientnickname":"庄勇斌","createtime":1571816150388,"timelength":3,"state":0,"device_id":"9ac019acab486ad7db721f2b6f1b94a8"},{"id":"92b67b20f56711e9bf019f8fc7ccebdc15134552845","username":"15134552845","usernickname":"Jesse1","message":"img/leavingmessage/9ac019acab486ad7db721f2b6f1b94a8/2019102315343715134552845.amr","recipient":"hsq1","recipientnickname":"庄勇斌","createtime":1571816080338,"timelength":3,"state":0,"device_id":"9ac019acab486ad7db721f2b6f1b94a8"},{"id":"881b06e0f56711e9bf019f8fc7ccebdc15134552845","username":"15134552845","usernickname":"Jesse1","message":"img/leavingmessage/9ac019acab486ad7db721f2b6f1b94a8/2019102315341915134552845.amr","recipient":"hsq1","recipientnickname":"庄勇斌","createtime":1571816062542,"timelength":3,"state":0,"device_id":"9ac019acab486ad7db721f2b6f1b94a8"},{"id":"7c580290f56711e9bf019f8fc7ccebdc15134552845","username":"15134552845","usernickname":"Jesse1","message":"img/leavingmessage/9ac019acab486ad7db721f2b6f1b94a8/2019102315335915134552845.amr","recipient":"hsq1","recipientnickname":"庄勇斌","createtime":1571816042809,"timelength":3,"state":0,"device_id":"9ac019acab486ad7db721f2b6f1b94a8"},{"id":"5412ddf0f56711e9a136ffa41981bd9815134552845","username":"15134552845","usernickname":"Jesse1","message":"img/leavingmessage/9ac019acab486ad7db721f2b6f1b94a8/2019102315324015134552845.amr","recipient":"hsq1","recipientnickname":"庄勇斌","createtime":1571815975247,"timelength":5,"state":0,"device_id":"9ac019acab486ad7db721f2b6f1b94a8"},{"id":"c106a150f56511e9a136ffa41981bd9815134552845","username":"15134552845","usernickname":"Jesse1","message":"img/leavingmessage/9ac019acab486ad7db721f2b6f1b94a8/2019102315213515134552845.amr","recipient":"hsq3","recipientnickname":"庄勇斌2","createtime":1571815299045,"timelength":3,"state":0,"device_id":"9ac019acab486ad7db721f2b6f1b94a8"},{"id":"866af7d0f56511e9a136ffa41981bd9815134552845","username":"15134552845","usernickname":"Jesse1","message":"img/leavingmessage/9ac019acab486ad7db721f2b6f1b94a8/2019102315195515134552845.amr","recipient":"16620010121","recipientnickname":"奇信智能","createtime":1571815200717,"timelength":5,"state":0,"device_id":"9ac019acab486ad7db721f2b6f1b94a8"}]
     * current_page : 1
     * sum : 13
     */

    private int current_page;
    private int sum;
    private List<ResultBean> result;

    public LeaveVoiceMsgBean() {
    }

    protected LeaveVoiceMsgBean(Parcel in) {
        this.current_page = in.readInt();
        this.sum = in.readInt();
        this.result = in.createTypedArrayList(ResultBean.CREATOR);
    }

    public int getCurrent_page() {
        return current_page;
    }

    public void setCurrent_page(int current_page) {
        this.current_page = current_page;
    }

    public int getSum() {
        return sum;
    }

    public void setSum(int sum) {
        this.sum = sum;
    }

    public List<ResultBean> getResult() {
        return result;
    }

    public void setResult(List<ResultBean> result) {
        this.result = result;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.current_page);
        dest.writeInt(this.sum);
        dest.writeTypedList(this.result);
    }

    public static class ResultBean implements Parcelable {
        public static final Creator<ResultBean> CREATOR = new Creator<ResultBean>() {
            @Override
            public ResultBean createFromParcel(Parcel source) {
                return new ResultBean(source);
            }

            @Override
            public ResultBean[] newArray(int size) {
                return new ResultBean[size];
            }
        };
        /**
         * id : 10c683c0f56811e9bc8361b90f4d456415134552845
         * username : 15134552845
         * usernickname : Jesse1
         * message : img/leavingmessage/9ac019acab486ad7db721f2b6f1b94a8/2019102315381015134552845.amr
         * recipient : hsq3
         * recipientnickname : 庄勇斌2
         * createtime : 1571816291836
         * timelength : 2
         * state : 0
         * device_id : 9ac019acab486ad7db721f2b6f1b94a8
         */

        private String id;
        private String username;
        private String usernickname;
        private String message;
        private String recipient;
        private String recipientnickname;
        private long createtime;
        private float timelength;
        private int state;
        private String device_id;

        public ResultBean() {
        }

        protected ResultBean(Parcel in) {
            this.id = in.readString();
            this.username = in.readString();
            this.usernickname = in.readString();
            this.message = in.readString();
            this.recipient = in.readString();
            this.recipientnickname = in.readString();
            this.createtime = in.readLong();
            this.timelength = in.readFloat();
            this.state = in.readInt();
            this.device_id = in.readString();
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getUsername() {
            return username;
        }

        public void setUsername(String username) {
            this.username = username;
        }

        public String getUsernickname() {
            return usernickname;
        }

        public void setUsernickname(String usernickname) {
            this.usernickname = usernickname;
        }

        public String getMessage() {
            return message;
        }

        public void setMessage(String message) {
            this.message = message;
        }

        public String getRecipient() {
            return recipient;
        }

        public void setRecipient(String recipient) {
            this.recipient = recipient;
        }

        public String getRecipientnickname() {
            return recipientnickname;
        }

        public void setRecipientnickname(String recipientnickname) {
            this.recipientnickname = recipientnickname;
        }

        public long getCreatetime() {
            return createtime;
        }

        public void setCreatetime(long createtime) {
            this.createtime = createtime;
        }

        public float getTimelength() {
            return timelength;
        }

        public void setTimelength(float timelength) {
            this.timelength = timelength;
        }

        public int getState() {
            return state;
        }

        public void setState(int state) {
            this.state = state;
        }

        public String getDevice_id() {
            return device_id;
        }

        public void setDevice_id(String device_id) {
            this.device_id = device_id;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.id);
            dest.writeString(this.username);
            dest.writeString(this.usernickname);
            dest.writeString(this.message);
            dest.writeString(this.recipient);
            dest.writeString(this.recipientnickname);
            dest.writeLong(this.createtime);
            dest.writeFloat(this.timelength);
            dest.writeInt(this.state);
            dest.writeString(this.device_id);
        }
    }
}
